object DataModule1: TDataModule1
  OldCreateOrder = False
  Height = 532
  Width = 782
  object ADOConnection1: TADOConnection
    ConnectionString = 'Provider=MSDASQL.1;Persist Security Info=False;charset=cp1251;'
    LoginPrompt = False
    Provider = 'MSDASQL.1'
    Left = 40
    Top = 16
  end
  object ADOQuerySTOCK_MAIN: TADOQuery
    Connection = ADOConnection1
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'SELECT barcode.*, SUM(serials.quantity) AS amount'
      'FROM barcode '
      'LEFT JOIN serials ON barcode.barcode = serials.barcode'
      'GROUP BY barcode.barcode')
    Left = 160
    Top = 16
  end
  object DataSourceSTOCK_MAIN: TDataSource
    DataSet = ADOQuerySTOCK_MAIN
    Left = 304
    Top = 16
  end
  object ADOQuerySTOCK_DETAIL: TADOQuery
    Connection = ADOConnection1
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'SELECT *'
      'FROM barcode, serials'
      'WHERE barcode.barcode = serials.barcode'
      'AND barcode.barcode = '#39'1'#39)
    Left = 160
    Top = 72
  end
  object DataSourceSTOCK_DETAIL: TDataSource
    DataSet = ADOQuerySTOCK_DETAIL
    Left = 304
    Top = 72
  end
  object ADOQueryCODE: TADOQuery
    Connection = ADOConnection1
    Parameters = <>
    Left = 40
    Top = 112
  end
  object ADOQueryINVOICE: TADOQuery
    Connection = ADOConnection1
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'SELECT *'
      'FROM barcode, invoice'
      'WHERE barcode.barcode = invoice.barcode')
    Left = 160
    Top = 128
  end
  object DataSourceINVOICE: TDataSource
    DataSet = ADOQueryINVOICE
    Left = 304
    Top = 128
  end
  object ADOQueryLOG: TADOQuery
    Connection = ADOConnection1
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'SELECT *'
      'FROM log LEFT JOIN barcode ON log.barcode = barcode.barcode'
      'ORDER BY data DESC')
    Left = 160
    Top = 184
  end
  object DataSourceLOG: TDataSource
    DataSet = ADOQueryLOG
    Left = 304
    Top = 184
  end
  object ADOQueryCASH: TADOQuery
    Connection = ADOConnection1
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'SELECT *'
      
        'FROM barcode LEFT JOIN serials ON barcode.barcode = serials.barc' +
        'ode'
      'WHERE barcode.barcode = '#39#39' OR serial_number = '#39'123'#39)
    Left = 160
    Top = 240
  end
  object DataSourceTICKET: TDataSource
    DataSet = ADOQueryTICKET
    Left = 304
    Top = 296
  end
  object DataSourceCASH: TDataSource
    DataSet = ADOQueryCASH
    Left = 304
    Top = 240
  end
  object ADOQueryBILL: TADOQuery
    Connection = ADOConnection1
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'SELECT *'
      'FROM bill'
      'WHERE completed = 0'
      'AND bill_type = 0')
    Left = 40
    Top = 256
  end
  object ADOQueryTICKET: TADOQuery
    Connection = ADOConnection1
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'SELECT *, cena * quantity AS summa'
      
        'FROM ticket LEFT JOIN barcode ON ticket.barcode = barcode.barcod' +
        'e'
      'WHERE id_bill = 5')
    Left = 160
    Top = 296
  end
  object ADOQueryARREARS: TADOQuery
    Connection = ADOConnection1
    CursorType = ctStatic
    Parameters = <>
    SQL.Strings = (
      'SELECT * FROM arrears')
    Left = 160
    Top = 352
  end
  object DataSourceARREARS: TDataSource
    DataSet = ADOQueryARREARS
    Left = 304
    Top = 352
  end
end
